package com.gla.giliair.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * flight
 * @author 
 */
@ApiModel(value="com.gla.giliair.entity.Flight航班表")
@Data
public class Flight implements Serializable {
    /**
     * 航班id
     */
    @ApiModelProperty(value="航班id")
    private Long flightId;

    /**
     * 航班号
     */
    @ApiModelProperty(value="航班号")
    private String flightNumber;

    /**
     * 出发城市
     */
    @ApiModelProperty(value="出发城市")
    private String leavePoint;

    /**
     * 到达城市
     */
    @ApiModelProperty(value="到达城市")
    private String arrivePoint;

    /**
     * 出发机场
     */
    @ApiModelProperty(value="出发机场")
    private String leaveAirport;

    /**
     * 到达机场
     */
    @ApiModelProperty(value="到达机场")
    private String arriveAirport;

    /**
     * 出发时间
     */
    @ApiModelProperty(value="出发时间")
    private Date leaveTime;

    /**
     * 到达时间
     */
    @ApiModelProperty(value="到达时间")
    private Date arriveTime;

    /**
     * 耗费时长
     */
    @ApiModelProperty(value="耗费时长")
    private String flightDuration;

    /**
     * 航空公司外键id
     */
    @ApiModelProperty(value="航空公司外键id")
    private Long companyId;

    /**
     * 公司代号
     */
    @ApiModelProperty(value="公司代号")
    private String companyCode;

    /**
     * 公司名
     */
    @ApiModelProperty(value="公司名")
    private String companyName;

    /**
     * 飞机机型外键id
     */
    @ApiModelProperty(value="飞机机型外键id")
    private Long planemodelId;

    /**
     * 飞机机型名称
     */
    @ApiModelProperty(value="飞机机型名称")
    private String planemodelName;

    /**
     * 舱位信息外键id
     */
    @ApiModelProperty(value="舱位信息外键id")
    private Long cabinInfoId;

    /**
     * 最低价格原价
     */
    @ApiModelProperty(value="最低价格原价")
    private BigDecimal leastOriginalPrice;

    /**
     * 最低价格折扣价，仅根据成人票和普通客户的折扣进行计算
     */
    @ApiModelProperty(value="最低价格折扣价，仅根据成人票和普通客户的折扣进行计算")
    private BigDecimal leastPrice;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Flight other = (Flight) that;
        return (this.getFlightId() == null ? other.getFlightId() == null : this.getFlightId().equals(other.getFlightId()))
            && (this.getFlightNumber() == null ? other.getFlightNumber() == null : this.getFlightNumber().equals(other.getFlightNumber()))
            && (this.getLeavePoint() == null ? other.getLeavePoint() == null : this.getLeavePoint().equals(other.getLeavePoint()))
            && (this.getArrivePoint() == null ? other.getArrivePoint() == null : this.getArrivePoint().equals(other.getArrivePoint()))
            && (this.getLeaveAirport() == null ? other.getLeaveAirport() == null : this.getLeaveAirport().equals(other.getLeaveAirport()))
            && (this.getArriveAirport() == null ? other.getArriveAirport() == null : this.getArriveAirport().equals(other.getArriveAirport()))
            && (this.getLeaveTime() == null ? other.getLeaveTime() == null : this.getLeaveTime().equals(other.getLeaveTime()))
            && (this.getArriveTime() == null ? other.getArriveTime() == null : this.getArriveTime().equals(other.getArriveTime()))
            && (this.getFlightDuration() == null ? other.getFlightDuration() == null : this.getFlightDuration().equals(other.getFlightDuration()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getCompanyCode() == null ? other.getCompanyCode() == null : this.getCompanyCode().equals(other.getCompanyCode()))
            && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
            && (this.getPlanemodelId() == null ? other.getPlanemodelId() == null : this.getPlanemodelId().equals(other.getPlanemodelId()))
            && (this.getPlanemodelName() == null ? other.getPlanemodelName() == null : this.getPlanemodelName().equals(other.getPlanemodelName()))
            && (this.getCabinInfoId() == null ? other.getCabinInfoId() == null : this.getCabinInfoId().equals(other.getCabinInfoId()))
            && (this.getLeastOriginalPrice() == null ? other.getLeastOriginalPrice() == null : this.getLeastOriginalPrice().equals(other.getLeastOriginalPrice()))
            && (this.getLeastPrice() == null ? other.getLeastPrice() == null : this.getLeastPrice().equals(other.getLeastPrice()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFlightId() == null) ? 0 : getFlightId().hashCode());
        result = prime * result + ((getFlightNumber() == null) ? 0 : getFlightNumber().hashCode());
        result = prime * result + ((getLeavePoint() == null) ? 0 : getLeavePoint().hashCode());
        result = prime * result + ((getArrivePoint() == null) ? 0 : getArrivePoint().hashCode());
        result = prime * result + ((getLeaveAirport() == null) ? 0 : getLeaveAirport().hashCode());
        result = prime * result + ((getArriveAirport() == null) ? 0 : getArriveAirport().hashCode());
        result = prime * result + ((getLeaveTime() == null) ? 0 : getLeaveTime().hashCode());
        result = prime * result + ((getArriveTime() == null) ? 0 : getArriveTime().hashCode());
        result = prime * result + ((getFlightDuration() == null) ? 0 : getFlightDuration().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getCompanyCode() == null) ? 0 : getCompanyCode().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getPlanemodelId() == null) ? 0 : getPlanemodelId().hashCode());
        result = prime * result + ((getPlanemodelName() == null) ? 0 : getPlanemodelName().hashCode());
        result = prime * result + ((getCabinInfoId() == null) ? 0 : getCabinInfoId().hashCode());
        result = prime * result + ((getLeastOriginalPrice() == null) ? 0 : getLeastOriginalPrice().hashCode());
        result = prime * result + ((getLeastPrice() == null) ? 0 : getLeastPrice().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", flightId=").append(flightId);
        sb.append(", flightNumber=").append(flightNumber);
        sb.append(", leavePoint=").append(leavePoint);
        sb.append(", arrivePoint=").append(arrivePoint);
        sb.append(", leaveAirport=").append(leaveAirport);
        sb.append(", arriveAirport=").append(arriveAirport);
        sb.append(", leaveTime=").append(leaveTime);
        sb.append(", arriveTime=").append(arriveTime);
        sb.append(", flightDuration=").append(flightDuration);
        sb.append(", companyId=").append(companyId);
        sb.append(", companyCode=").append(companyCode);
        sb.append(", companyName=").append(companyName);
        sb.append(", planemodelId=").append(planemodelId);
        sb.append(", planemodelName=").append(planemodelName);
        sb.append(", cabinInfoId=").append(cabinInfoId);
        sb.append(", leastOriginalPrice=").append(leastOriginalPrice);
        sb.append(", leastPrice=").append(leastPrice);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}